package com.hxkj.client.service;

import com.hxkj.domain.po.Notice;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


/**
 * @author chenfangzhou
 * @create 2018-05-23 11:58
 * @desc 公告对外接口
 **/
@FeignClient(name = "cms-management")
public interface NoticeServiceClient {
    /**
     * 获取公告列表
     *
     * @param parameterDataStruct 公告对象
     * @return 翻页数据
     * @throws Exception
     */
    @RequestMapping(value = "/notice/getlist", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultPageStruct<Notice> getNoticeList(@RequestBody ParameterDataStruct<Notice> parameterDataStruct) throws Exception;

    /**
     * 获取单个公告
     */
    @RequestMapping(value = "/notice/get", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<Notice> getNotice(@RequestBody Notice notice) throws Exception;

    /**
     * 新增公告
     *
     * @param notice 公告信息
     * @throws Exception
     */
    @RequestMapping(value = "/notice/save", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct saveNotice(@RequestBody Notice notice) throws Exception;


    /**
     * 删除公告
     *
     * @param notice
     * @throws Exception
     */
    @RequestMapping(value = "/notice/remove", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct deleteNotice(@RequestBody Notice notice) throws Exception;

    /**
     * 修改友情链接
     */
    @RequestMapping(value = "/notice/modify", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct updateNotice(@RequestBody Notice notice) throws Exception;


}
